﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Website
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string host = Request.ServerVariables["HTTP_HOST"];
            if (!IsPostBack)
            {
                if (Request.QueryString["code"] != null)
                {
                    //nothing
                }
                else
                {
                    string spath = @"https://graph.facebook.com/oauth/authorize?client_id=" +
                                   "206388329486388" + "&redirect_uri=http://" + host +
                                   @"/default.aspx&scope=publish_stream";
                    Response.Redirect(spath);
                }
            }
        }


    }
}
